               		<div class="comment_title">用户评价（{$comment|count}）</div>
                     <volist name="comment" id="vo">
                    <dl class="comment_sub clearfix" id="cmt{$vo.id}">
                    	<dt>
                        	{:show_gravatar($vo['email'],$vo['username'])}
                        </dt>
                        <dd>
                        	<div class="comment_content">
                            	<span>{$vo.username} 留言于：{$vo.add_time|date='Y-m-d',###}</span>
                                <p><neq name="vo.parent_id" value="0">
                回复<a href="#cmt{$vo.parent_id}" title="@{$vo.parent_username}">{$vo.parent_username}：</a>
            </neq>{$vo.content}</p>
                            </div>                            
                        </dd>
                    </dl>
                    </volist>
<div id="newCommentContainer"></div>
                    <div class="pt30"  id="comments">
                    	<div class="clearfix">
                        	<span class="comment_field_title">昵称</span>
                            <input type="text" value="" class="comment_field_input " id="userName"  name="username" data_error="请告诉我你的大名"/>
                            <span class="comment_field_tip" id="userNameTip">必填</span>
                        </div>
                    	<div class="clearfix pt10">
                        	<span class="comment_field_title">电子邮件</span>
                            <input type="text" value="" class="comment_field_input" name="email" />
                        </div>
                    	<div class="clearfix pt10">
                        	<span class="comment_field_title">QQ</span>
                            <input type="text" value="" class="comment_field_input"  name="qq"/>
                        </div>
                    	<div class="clearfix pt10">
                        	<span class="comment_field_title comment_field_textarea_title">内容</span>
                            <textarea class="comment_field_textarea" id="userContent" name="content"  data_error="请留下您的圣言"></textarea>
                            <span class="comment_field_tip ml50" id="userContentTip">必填</span>
                        </div> 
                    	<div class="clearfix pt10">
                        	<span class="comment_field_title">验证码</span>
                            <input type="text" value="" class="comment_field_input comment_field_input_code"  name="verify" id="verify" data_error="请输入验证码"/>
                            <img src="{:U('Comment/verify')}" alt="点击刷新验证码" id="changeVerify" style="cursor:pointer;" class="ml5 fl"/>
                            <span class="comment_field_tip" id="verifyTip">必填</span>
                        </div>                        
                        <div class="clearfix pt10 pb20">
                        	<a href="javascript:void(0);" class="comment_btn comment_btn_disabled " title="提交">提交</a>
                        </div>                                                                        
                    </div>  
                    <input type="hidden" name="parent_id" value="0" />
        <input type="hidden" name="value_id" value="{$data.id}"/>
        <input type="hidden" name="source" value="[source]"  />                                  
               <script type="text/javascript">
               $(function(){
  					$('#changeVerify').click(function(){
  					 	var timenow = new Date().getTime();		
         				$(this).attr('src',"{:U('Comment/verify')}/d/"+timenow);
    				});				   
					  $(".comment_field_input,.comment_field_textarea").focus(function(){
							$(this).addClass('comment_field_input_h'); 
						}).blur(function(){
								$(this).removeClass('comment_field_input_h'); 
						});
					$('#userName,#userContent,#verify').blur(function(){
						var $this=$(this);
						var $errorTip=$('#'+$this.attr('id')+'Tip');
						var errorText=$this.attr('data_error');
						var v=$(this).val();
						if(v=='')
						{
							$errorTip.addClass('comment_field_tip_error').html(errorText);
							$('.comment_btn').addClass('comment_btn_disabled');
						}else
								{
									if($('#userContent').val()!='')
									{
										$errorTip.removeClass('comment_field_tip_error').html('');
										$('.comment_btn').removeClass('comment_btn_disabled');
									}else
										{
											$errorTip.removeClass('comment_field_tip_error').html('').hide();
										}
								}
					});
					$('.comment_btn').on('click',function(){
						var $this=$(this);
						$('#userName,#userContent,#verify').blur();
						if(!$this.hasClass('comment_btn_disabled'))
						{
							var $commentForm=$('#commentData');
							var data=$commentForm.serialize();
							var url=$commentForm.attr('action');
							$.post(url,data,function(data){
								if(data.status==1)
								{
									var data=data.data;
									var $newCommentContainer=$('#newCommentContainer');
									var html='<dl class="comment_sub clearfix"><dt>'+data.faceImg+'</dt><dd><div class="comment_content"><span>'+data.username+'：'+data.add_time+'</span><p>您的评论提交成功，等待博主的审核，多谢你的参与！</p></div></dd></dl>';
									$newCommentContainer.append(html);
									$('.comment_field_input,.comment_field_textarea').val('');
									$this.addClass('comment_btn_disabled');
									$('#changeVerify').click();
								}else
									{
										alert(data.info);
										$('#changeVerify').click();
									}
								
							},'json');
						}
					});	
				
				});
               </script>